<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\CouponSetting
 *
 * @property int $id
 * @property int|null $type 0  用户关注类型 1 满足条件类型
 * @property string|null $name
 * @property int|null $order_num 推广的订单数
 * @property float|null $money 推广的金额
 * @property int|null $coupon_id 优惠券id
 * @property string|null $start_time
 * @property string|null $end_time
 * @property int|null $user_num 满足推广人数
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereCouponId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereOrderNum($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereStartTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\CouponSetting whereUserNum($value)
 * @mixin \Eloquent
 */
class CouponSetting extends Model
{
    protected $table='coupon_setting';
    public $timestamps=false;
    const  SUBSCRIBE=0;//'关注公众号'
    const  CONDITION=1;//条件


    public function coupon(){
        $this->hasOne(Coupon::class,'coupon_id');
    }
}
